package com.sina.weibo;

import android.content.Context;
import android.os.Handler;
import android.widget.LinearLayout;
import android.widget.ProgressBar;
import android.widget.TextView;
import android.widget.Toast;

public class CustomToast
{
  private boolean isCancelled;
  private Context mContext;
  private Handler mHandler = null;
  private Toast mToast;

  public CustomToast(Context paramContext, int paramInt)
  {
    Handler localHandler = new Handler();
    this.mHandler = localHandler;
    this.mContext = paramContext;
    Toast localToast = Utils.createProgressToast(paramInt, paramContext);
    this.mToast = localToast;
    this.isCancelled = 1;
  }

  private void doShow()
  {
    if ((!this.isCancelled) && (!MainTabActivity.mIsFinished))
    {
      this.mToast.show();
      Handler localHandler = this.mHandler;
      CustomToast.1 local1 = new CustomToast.1(this);
      boolean bool = localHandler.postDelayed(local1, 1000L);
    }
  }

  public void cancel()
  {
    this.isCancelled = 1;
    this.mToast.cancel();
  }

  public boolean isShown()
  {
    if (this.isCancelled);
    for (int i = 0; ; i = 1)
      return i;
  }

  public void setText(int paramInt, Context paramContext)
  {
    LinearLayout localLinearLayout = new LinearLayout(paramContext);
    TextView localTextView = Utils.setTextView(paramInt, paramContext);
    if (paramContext.getClass() == ImageViewer.class)
      localTextView.setTextColor(-1);
    for (ProgressBar localProgressBar = new ProgressBar(paramContext, null, 16842873); ; localProgressBar = new ProgressBar(paramContext, null, 16843400))
    {
      localLinearLayout.addView(localProgressBar);
      localLinearLayout.addView(localTextView);
      this.mToast.setView(localLinearLayout);
      return;
    }
  }

  public void show()
  {
    this.isCancelled = 0;
    doShow();
  }
}

/* Location:           D:\Program Files\eclipse\apktool-r01-3\新浪微博\classes.dex.dex2jar.jar
 * Qualified Name:     com.sina.weibo.CustomToast
 * JD-Core Version:    0.6.0
 */